;
$(function () {

    var ad = appData();

    sessionStorage.clear();

    /*$("#verifyImg").prop("src", $.getRadParamUrl(appApi("LOGIN_VERIFY"))).on("click", function() {
        $(this).prop("src", $.getRadParamUrl(appApi("LOGIN_VERIFY")));
    });*/

    $("#login").on("click", loginF);

    $('#username,#password,#verify').on('keypress', function (event) {
        if (event.keyCode == "13") loginF();
    });

    function loginF() {

        ad.insert("LOGIN", {
            userName: $("#username").val(),
            userPwd: $("#password").val(),
            verifyCode: $("#verify").val()
        }, function (data) {
            if (data) {
                window.location.href = "index.html";
            }
        })
    }

    $("#username").focus();

})